﻿using System;
using System.Net;
using System.Xml.Linq;

namespace ArmoryBrowser.Entities
{
    public class WeaponDamage
    {
        #region Fields
        private string _dpsField;
        private string _maxField;
        private string _minField;
        private string _percentField;
        private string _speedField;
        #endregion
        #region Properties
        public string Dps
        {
            get
            {
                return this._dpsField;
            }
            set
            {
                this._dpsField = value;
            }
        }

        public string Max
        {
            get
            {
                return this._maxField;
            }
            set
            {
                this._maxField = value;
            }
        }

        public string Min
        {
            get
            {
                return this._minField;
            }
            set
            {
                this._minField = value;
            }
        }

        public string Percent
        {
            get
            {
                return this._percentField;
            }
            set
            {
                this._percentField = value;
            }
        }

        public string Speed
        {
            get
            {
                return this._speedField;
            }
            set
            {
                this._speedField = value;
            }
        }
        #endregion
        #region Constructor
        public WeaponDamage(XElement element)
        {
            Dps = element.GetAttributeValue("dps");
            Max = element.GetAttributeValue("max");
            Min = element.GetAttributeValue("min");
            Percent = element.GetAttributeValue("percent");
            Speed = element.GetAttributeValue("speed");
        }
        #endregion
    }
}
